package com.macken.zjh.screens;

import com.macken.zjh.Zjh;
import com.macken.zjh.constant.Constants;
import com.macken.zjh.entity.Desktop;
import com.macken.zjh.network.req.DeskRequest;

public class EnterDeskLoad extends LoadScreen {

	public int state;
	public Desktop desk;

	public EnterDeskLoad(Zjh game) {
		super(game);
		state = 0;
	}

	@Override
	public void show() {
		super.show();
		DeskRequest request = new DeskRequest();
		request.did = 0;
		request.pid = Zjh.pid;
		request.action = Constants.DESK_ENTER;
		game.socketAcceptor.write(request);
	}

	@Override
	public void loaddata() {
		if (state == 1) {
			GameScreen gs = new GameScreen(game);
			gs.init(desk);
			game.setScreen(gs);
		}
	}

}
